package CH06.Game4;

/**
 * Created by lenovo on 2016/3/26.
 */
public class RPG {
    public static void main(String[] args) {
        SwordsMan swordsMan = new SwordsMan();
        swordsMan.setName("皮卡丘");
        swordsMan.setLevel(1);
        swordsMan.setBlood(200);

        Magician magician = new Magician();
        magician.setName("小智");
        magician.setLevel(1);
        magician.setBlood(100);

        drawFight(swordsMan);
        drawFight(magician);
        System.out.println(swordsMan.toString());
        System.out.println(magician.toString());
    }

    static void drawFight(Role role) {
        System.out.print(role.getName());
        role.fight();
    }
}
